package com.mo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

@TableName(value = "sys_user")
@Data
public class User implements Serializable {
    /**
     * 用户ID
     */
    @TableId(type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Integer userId;

    /**
     * 登录账户
     */
    private String username;

    /**
     * 登录密码
     */
    private String password;

    /**
     * 姓名
     */
    private String realName;

    /**
     * 电话
     */
    private String phone;

    /**
     * 性别 0未知 1男 2女
     */
    private String gender;

    /**
     * 身份证号码
     */
    private String idCard;

    /**
     * 是否在职 0在职 1离职
     */
    private String isActive;

    /**
     * 是否禁用 0否 1是
     */
    private String isDisabled;

    @TableField(exist = false)
    private List<GrantedAuthority> authorities;

    @TableField(exist = false)
    private static final long serialVersionUID = 346443L;
}